home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 076-100 / disk_092 / as6502 / assmtest.l < prev    next >
Text File  |  1992-05-06  |  8KB  |  155 lines

  1.  
  2. Amiga 6502 assembler :  -  A test program for as6502                                                                         PAGE 1
  3. Line      Location     Label Opcode Operand  Comment   Sat Apr 25 07:49:36 1987
  4.  
  5.    3                   ;******************************************
  6.    4                   ; Test file for the 6502 assembler - as6502
  7.    5                   ; assemble as
  8.    6                   ;     as6502 -nsv assmtest
  9.    7                   ; and compare output with assmtest.l
  10.    8                   ;******************************************
  11.    9                   ;                      ; comment treatment
  12.   10                   ;******************************************
  13.   11         0010      aa      =     $10      ; ';' immediately after the '0'
  14.   12         0020      B       =     $20      space to comment subfield
  15.   13         0030      C       =     $30      tab to comment subfield
  16.   14         FFEE      DEFGHIjkl =   $FFEE
  17.   15         FFEE      D       =DEFGHIjkl
  18.   16                   ;******************************************
  19.   17                   ; Number formats
  20.   18                   ;******************************************
  21.   19  0000   05                .byte %0101     ; binary number
  22.   20  0001   12 12             .byte 022,@22   ; octal numbers - two forms
  23.   21  0003   16                .byte 22        ; decimal number
  24.   22  0004   22 FF FF          .byte $22,$ff,$FF  ; hex - upper/lower case
  25.   23  0007   61 62             .byte 'a,'b     ; single ASCII characters
  26.   24                   ;******************************************
  27.   25                   ;                      ; ASCII character string
  28.   26                   ;******************************************
  29.   27  0009   61 62 63          .byte "abcd\t\n",0  ;   tab and new line escaped
  30.       000C   64 09 0A  
  31.       000F   00        
  32.   28                   ;******************************************
  33.   29                   ; Operation checks
  34.   30                   ;******************************************
  35.   31  0010   30 00             .word aa+B      ; addition
  36.   32  0012   F0 FF             .word aa-B      ; subtraction
  37.   33  0014   00 02             .word aa*B      ; multiplication
  38.   34  0016   02 00             .word B/aa      ; division
  39.   35  0018   10 00             .word C%B       ; modulo
  40.   36  001A   10 00             .word B^C       ; exclusive OR
  41.   37  001C   CF FF             .word ~C        ; one's complement
  42.   38  001E   20 00             .word B&C       ; logical AND
  43.   39  0020   30 00             .word aa|B      ; logical OR
  44.   40  0022   EE 00             .word <D        ; low byte
  45.   41  0024   FF 00             .word >D        ; high byte
  46.   42  0026   26 00             .word *         ; current location
  47.   43  0028   10 00             .word aa,B,C
  48.       002A   20 00     
  49.       002C   30 00     
  50.   44  002E   00 08             .word B*[aa+C]  ; one level of parenthesis
  51.   45  0030   FF EE             .dbyt D         ; high byte-low byte word
  52.   46  0032   FF 00             .word D/256,D%256
  53.       0034   EE 00     
  54.   47                   ;******************************************
  55.   48                   ; Addressing Mode Check
  56.   49                   ;******************************************
  57.   50         0100              *=$0100
  58.   51  0100   A9 10             lda   =aa       ; immediate addressing
  59.   52  0102   A9 10             lda   #aa       ; immediate addressing, alternate
  60.   53  0104   AD EE FF          lda   D         ; direct addessing
  61.   54  0107   A5 10             LDA   aa        ; page zero addressing, aa < 256
  62.   55         0200      a1      =     512
  63.   56         01F4      a2      =     500
  64.   57  0109   A5 0C             lda   a1-a2     ; also page zero
  65.  
  66. Amiga 6502 assembler :  -  A test program for as6502                                                                         PAGE 2
  67. Line      Location     Label Opcode Operand  Comment   Sat Apr 25 07:49:36 1987
  68.  
  69.   58  010B   0A                asl   A         ; accumulator addressing
  70.   59  010C   0A                AsL   a         ; accumulator addressing also
  71.   60  010D   00                brk            ; implied addressing
  72.   61  010E   A1 10             lda   (aa,X)    ; indirect,X addressing
  73.   62  0110   B1 10             lda   (aa),Y    ; indirect,Y addressing
  74.   63  0112   B5 10             lda   aa,X      ; zero page,X addressing
  75.   64  0114   BD EE FF          lda   D,X       ; absolute,X addressing
  76.   65  0117   B9 EE FF          lda   D,Y       ; absolute,Y addressing
  77.   66  011A   90 EE             bcc   *-$10     ; relative addressing
  78.   67  011C   6C EE FF          jmp   (D)       ; indirect addressing
  79.   68  011F   B6 10             ldx   aa,Y      ; zero page,Y addressing
  80.   69  0121   B6 10             ldx   aa,y      ; alternate index name
  81.   73                   ;******************************************
  82.   74                   ; opcode check
  83.   75                   ;******************************************
  84.   76  0123   69 01             adc   =01
  85.   77  0125   29 01             and   =01
  86.   78  0127   0A                asl   A
  87.   79  0128   90 00             bcc   *+2
  88.   80  012A   B0 00             bcs   *+2
  89.   81  012C   F0 00             beq   *+2
  90.   82  012E   24 01             bit   $01
  91.   83  0130   30 00             bmi   *+2
  92.   84  0132   D0 00             bne   *+2
  93.   85  0134   10 00             bpl   *+2
  94.   86  0136   00                brk
  95.   87  0137   50 00             bvc   *+2
  96.   88  0139   70 00             bvs   *+2
  97.   89  013B   18                clc
  98.   90  013C   D8                cld
  99.   91  013D   58                cli
  100.   92  013E   B8                clv
  101.   93  013F   C9 01             cmp   =01
  102.   94  0141   E0 01             cpx   =01
  103.   95  0143   C0 01             cpy   =01
  104.   96  0145   C6 01             dec   $01
  105.   97  0147   CA                dex
  106.   98  0148   88                dey
  107.   99  0149   49 01             eor   =01
  108.  100  014B   E6 01             inc   $01
  109.  101  014D   E8                inx
  110.  102  014E   C8                iny
  111.  103  014F   4C 52 01          jmp   *+3
  112.  104  0152   20 55 01          jsr   *+3
  113.  105  0155   A9 01             lda   =01
  114.  106  0157   A2 01             ldx   =01
  115.  107  0159   A0 01             ldy   =01
  116.  108  015B   4A                lsr   A
  117.  109  015C   EA                nop
  118.  110  015D   09 01             ora   =01
  119.  111  015F   48                pha
  120.  112  0160   08                php
  121.  113  0161   68                pla
  122.  114  0162   28                plp
  123.  115  0163   2A                rol   A
  124.  116  0164   6A                ror   A
  125.  117  0165   40                rti
  126.  118  0166   60                rts
  127.  119  0167   E9 01             sbc   =01
  128.  120  0169   38                sec
  129.  
  130. Amiga 6502 assembler :  -  A test program for as6502                                                                         PAGE 3
  131. Line      Location     Label Opcode Operand  Comment   Sat Apr 25 07:49:36 1987
  132.  
  133.  121  016A   F8                sed
  134.  122  016B   78                sei
  135.  123  016C   85 01             sta   $01
  136.  124  016E   86 01             stx   $01
  137.  125  0170   84 01             sty   $01
  138.  126  0172   AA                tax
  139.  127  0173   A8                tay
  140.  128  0174   BA                tsx
  141.  129  0175   8A                txa
  142.  130  0176   9A                txs
  143.  131  0177   98                tya
  144.  
  145. Amiga 6502 assembler :  Symbol Cross Reference -                                                                             PAGE 4
  146. Symbol                Value Defined References
  147.  
  148.  B                     0020   12     (10) 31 32 33 34 35 36 38 39 43 44 
  149.  C                     0030   13     (6) 35 36 37 38 43 44 
  150.  DEFGHIjkl             FFEE   14     (1) 15 
  151.  D                     FFEE   15     (9) 40 41 45 46 46 53 64 65 67 
  152.  a1                    0200   55     (1) 57 
  153.  a2                    01F4   56     (1) 57 
  154.  aa                    0010   11     (15) 31 32 33 34 39 43 44 51 52 54 61 62 63 68 69 
  155.